<template>
	<view class="account_wrapper">
		<i class="iconfont icon-qian"></i>
		<view class="name">我的余额</view>
		<view class="money">￥{{ money }}</view>
		<button class="btn" @click="userWithdrawal">提现</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money: 0
			}
		},
		onLoad(options){
			this.init(options);
		},
		methods: {
			init(opt){	//	初始化
				this.money = opt.money;
			},
			userWithdrawal(){	// 提现
				uni.navigateTo({ url: `/pages/withdrawal/index?subIndex=0` });
			}	
		}
	}
</script>

<style lang="scss" scoped>
.account_wrapper{
	height: 80vh;
	padding: 100px 20px 0;
	box-sizing: border-box;
	text-align: center;
	overflow: hidden;
	position: relative;
	.iconfont{
		display: block;		
		font-size: 40px;
		color: orange;
	}
	.name{
		margin: 20px auto 0;
		font-size: 14px;
	}
	.money{
		margin: 0 auto 50px;
		font-size: 24px;	
		font-weight: bold;
	}
	.btn{
		display: block;
		width: 120px;
		font-size: 14px;		
		color: #58be6b;
		position: absolute;
		left: 50%;
		bottom: 50px;
		transform: translate(-50%,0);
		&::after{
			border: none;
		}
	}
}
</style>
